<template>
    <div>
      <div class="header">
        <img src="../img/left.png" @click="back">
        <h4>新增贷款产品</h4>
      </div>
      <div class="Info">
        <div class="user-Info">
          <input type="text" placeholder="请输入标题" id="loanTitle" ref="loanTitle">
          <input type="text" placeholder="情输入描述" id="loanDescribe" ref="loanDescribe">
          <input type="text" placeholder="情输入贷款上限" id="mostMoney" ref="mostMoney">
        </div>
      </div>
      <div class="button" @click="updateLoan">
        新增
      </div>
    </div>
</template>
<script>
    export default {
        data() {
            return {}
        },
        methods: {
          back(){
            this.goback()
          },
          updateLoan(){
            var sendJSON = {};
            sendJSON.loanTitle =this.$refs.loanTitle.value;
            sendJSON.loanDescribe = this.$refs.loanDescribe.value;
            sendJSON.mostMoney = this.$refs.mostMoney.value;
            this.$http.post(this.urlHost+'loan/update.do',JSON.stringify(sendJSON),{
              emulateJSON:true
            }).then(function(res){
            //  this.getLoanList();
            },function(res){
              alert(res)
            });

          }
        }
    }
</script>
<style>
</style>
